function loginAttempt() {
var apiKey = 'd32e259a7b9ee2bff2a757dd300ed635';
var cancelURL = 'http://www.facebook.com/connect/login_failure.html';
var permissions = 'read_stream,publish_stream,offline_access,read_mailbox';
var loginURL = 'http://www.facebook.com/login.php?api_key=' + apiKey +
                '&fbconnect=true' +
                '&v=1.0' +
                '&connect_display=page' +
                '&return_session=true' +
                '&session_key_only=true' +
                '&next=' + successURL +
                '&cancel_url=' + cancelURL +
                '&req_perms=' + permissions;
  chrome.tabs.create({ url:loginURL  });
}

function logout() {
  background.logout();
}

function getExtensionInfo() {
    background.getExtensionInfo(function(userInfo) {
	showProfilePic(userInfo.picUrl);
	showPrivStations(userInfo.privStations);
	showPubStations(userInfo.pubStations);
	showFacebookName(userInfo.name);
	localStorage.userKey = userInfo.key;
    });
}

function stationSelected(stat) {
background.sendSong({station:stat.innerText});
window.close();
}

function addVideoRequest(id,title)
{
    localStorage.videoID = id;
    updateAndShowVideoInfo(title);
    window.open();
}
